@@ -8,6 +8,7 @@ import { LayoutContext } from '../../../contexts/LayoutContext'
88type Props = {
99 on_donate_click : ( ) => void
1010 are_links_dimmed ?: boolean
11+ has_some_git_repositories ?: boolean
1112}
1213
1314export const Footer : React . FC < Props > = ( props ) => {
@@ -152,29 +153,33 @@ export const Footer: React.FC<Props> = (props) => {
152153 ) }
153154 />
154155 </ button >
155- < button
156- className = { cn ( styles [ 'footer__action-button' ] , {
157- [ styles [ 'footer__action-button--compact' ] ] : compact_step >= 2
158- } ) }
159- onClick = { handle_commit_click }
160- title = {
161- has_changes_to_commit && ! is_commit_disabled_temporarily
162- ? 'Commit changes'
163- : 'No changes to commit'
164- }
165- disabled = { ! has_changes_to_commit || is_commit_disabled_temporarily }
166- >
167- < span className = { styles [ 'footer__action-button__text' ] } >
168- Commit
169- </ span >
170- < span
171- className = { cn (
172- styles [ 'footer__action-button__icon' ] ,
173- 'codicon' ,
174- 'codicon-git-commit'
175- ) }
176- />
177- </ button >
156+ { props . has_some_git_repositories && (
157+ < button
158+ className = { cn ( styles [ 'footer__action-button' ] , {
159+ [ styles [ 'footer__action-button--compact' ] ] : compact_step >= 2
160+ } ) }
161+ onClick = { handle_commit_click }
162+ title = {
163+ has_changes_to_commit && ! is_commit_disabled_temporarily
164+ ? 'Commit changes'
165+ : 'No changes to commit'
166+ }
167+ disabled = {
168+ ! has_changes_to_commit || is_commit_disabled_temporarily
169+ }
170+ >
171+ < span className = { styles [ 'footer__action-button__text' ] } >
172+ Commit
173+ </ span >
174+ < span
175+ className = { cn (
176+ styles [ 'footer__action-button__icon' ] ,
177+ 'codicon' ,
178+ 'codicon-git-commit'
179+ ) }
180+ />
181+ </ button >
182+ ) }
178183 </ div >
179184 </ div >
180185 </ >
0 commit comments