Skip to content

Commit

Permalink
feat: extensible default footer component (#3883)
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 authored Sep 14, 2023
1 parent f51cb94 commit 06432c5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions framework/core/js/src/forum/ForumApplication.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import type NotificationModel from '../common/models/Notification';
import type PostModel from '../common/models/Post';
import extractText from '../common/utils/extractText';
import Notices from './components/Notices';
import Footer from './components/Footer';

export interface ForumApplicationData extends ApplicationData {}

Expand Down Expand Up @@ -118,6 +119,7 @@ export default class ForumApplication extends Application {
m.mount(document.getElementById('header-primary')!, HeaderPrimary);
m.mount(document.getElementById('header-secondary')!, HeaderSecondary);
m.mount(document.getElementById('notices')!, Notices);
m.mount(document.getElementById('footer')!, Footer);

// Route the home link back home when clicked. We do not want it to register
// if the user is opening it in a new tab, however.
Expand Down
7 changes: 7 additions & 0 deletions framework/core/js/src/forum/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Component from '../../common/Component';

export default class Footer extends Component {
view() {
return null;
}
}
2 changes: 2 additions & 0 deletions framework/core/views/frontend/forum.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
</div>
</main>

<footer class="App-footer" id="footer"></footer>

</div>

{!! $forum['footerHtml'] !!}

0 comments on commit 06432c5

Please sign in to comment.