Fix navbar back button behavior (#195)
* Enable passing backLink through location state. Explicitly handle cases for BACK * Allow pages to override default backLink. Fix manga page back link * Cleanup
This commit is contained in:
@@ -13,6 +13,7 @@ interface IProps{
|
||||
}
|
||||
|
||||
export default function NavBarProvider({ children }:IProps) {
|
||||
const [defaultBackTo, setDefaultBackTo] = useState<string | undefined>();
|
||||
const [title, setTitle] = useState<string>('Tachidesk');
|
||||
const [action, setAction] = useState<any>(<div />);
|
||||
const [override, setOverride] = useState<INavbarOverride>({
|
||||
@@ -21,6 +22,8 @@ export default function NavBarProvider({ children }:IProps) {
|
||||
});
|
||||
|
||||
const value = {
|
||||
defaultBackTo,
|
||||
setDefaultBackTo,
|
||||
title,
|
||||
setTitle,
|
||||
action,
|
||||
|
||||
Reference in New Issue
Block a user