Skip to content

Commit 0750533

Browse files
committed
fix(auth): render WordmarkLogo react component in auth layout to include lightbg asset
1 parent 4551f4a commit 0750533

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

app/javascript/entrypoints/public.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import loadKeyboardExtensions from '../mastodon/load_keyboard_extensions';
2020
import { loadLocale, getLocale } from '../mastodon/locales';
2121
import { loadPolyfills } from '../mastodon/polyfills';
2222
import ready from '../mastodon/ready';
23+
import { WordmarkLogo } from '@/mastodon/components/logo';
2324

2425
import 'cocoon-js-vanilla';
2526

@@ -183,6 +184,12 @@ function loaded() {
183184
});
184185
}
185186

187+
const authLogoHost = document.querySelector<HTMLElement>('.logo-react-root');
188+
if (authLogoHost) {
189+
const root = createRoot(authLogoHost);
190+
root.render(<WordmarkLogo />);
191+
}
192+
186193
on(
187194
'input',
188195
'input#user_account_attributes_username',

app/views/layouts/auth.html.haml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
- content_for :content do
55
.container-alt
66
.logo-container
7-
- if within_authorization_flow?
8-
= logo_as_symbol(:wordmark)
9-
- else
10-
= link_to root_path do
7+
.logo-react-root
8+
- if within_authorization_flow?
119
= logo_as_symbol(:wordmark)
10+
- else
11+
= link_to root_path do
12+
= logo_as_symbol(:wordmark)
1213

1314
.form-container
1415
= render 'flashes'

0 commit comments

Comments
 (0)