BLOG-16 fix: build failed (#17)
- squid 389d4ef4a9 BLOG-16 fix: build failed Reviewed-on: #17 Co-authored-by: SquidSpirit <squid@squidspirit.com> Co-committed-by: SquidSpirit <squid@squidspirit.com>
This commit is contained in:
parent
e12d815440
commit
fb3c204e76
@ -1,10 +1,12 @@
|
||||
import Link from "next/link";
|
||||
|
||||
export default function Navbar() {
|
||||
return (
|
||||
<div className="border-b border-gray-300">
|
||||
<div className="mx-auto flex h-[--tool-bar-height] max-w-screen-xl flex-row items-center justify-between px-4 md:px-6">
|
||||
<a className="text-2xl font-black text-gray-800" href="/">
|
||||
<Link className="text-2xl font-black text-gray-800" href="/">
|
||||
魚之魷魂
|
||||
</a>
|
||||
</Link>
|
||||
<div className="flex flex-row items-center gap-x-6">
|
||||
<Action label="首頁" link="/" isSelected={true} />
|
||||
</div>
|
||||
@ -18,12 +20,12 @@ function Action(props: { label: string; link: string; isSelected: boolean }) {
|
||||
<div
|
||||
className={`rounded px-1.5 ${props.isSelected ? "bg-blue-600" : "bg-transparent"}`}
|
||||
>
|
||||
<a
|
||||
<Link
|
||||
className={`font-extrabold ${props.isSelected ? "text-white" : "text-gray-800"}`}
|
||||
href={props.link}
|
||||
>
|
||||
{props.label}
|
||||
</a>
|
||||
</Link>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -9,12 +9,12 @@ import { tagStartedAction, tagStoppedAction } from "../../presenter/tagSlice";
|
||||
export default function SelfTags() {
|
||||
return (
|
||||
<Provider store={tagStore}>
|
||||
<_SelfTags />
|
||||
<SelfTagsProvided />
|
||||
</Provider>
|
||||
);
|
||||
}
|
||||
|
||||
function _SelfTags() {
|
||||
function SelfTagsProvided() {
|
||||
const tags = useTagSelector((state) => state.tag.tags);
|
||||
const dispatch = useTagDispatch();
|
||||
|
||||
@ -26,7 +26,7 @@ function _SelfTags() {
|
||||
dispatch(tagStoppedAction());
|
||||
setIsTagsVisible(false);
|
||||
};
|
||||
}, []);
|
||||
}, [dispatch]);
|
||||
|
||||
useEffect(() => {
|
||||
if (tags.length === 0) return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user