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() {
 | 
					export default function Navbar() {
 | 
				
			||||||
  return (
 | 
					  return (
 | 
				
			||||||
    <div className="border-b border-gray-300">
 | 
					    <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">
 | 
					      <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">
 | 
					        <div className="flex flex-row items-center gap-x-6">
 | 
				
			||||||
          <Action label="首頁" link="/" isSelected={true} />
 | 
					          <Action label="首頁" link="/" isSelected={true} />
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
@ -18,12 +20,12 @@ function Action(props: { label: string; link: string; isSelected: boolean }) {
 | 
				
			|||||||
    <div
 | 
					    <div
 | 
				
			||||||
      className={`rounded px-1.5 ${props.isSelected ? "bg-blue-600" : "bg-transparent"}`}
 | 
					      className={`rounded px-1.5 ${props.isSelected ? "bg-blue-600" : "bg-transparent"}`}
 | 
				
			||||||
    >
 | 
					    >
 | 
				
			||||||
      <a
 | 
					      <Link
 | 
				
			||||||
        className={`font-extrabold ${props.isSelected ? "text-white" : "text-gray-800"}`}
 | 
					        className={`font-extrabold ${props.isSelected ? "text-white" : "text-gray-800"}`}
 | 
				
			||||||
        href={props.link}
 | 
					        href={props.link}
 | 
				
			||||||
      >
 | 
					      >
 | 
				
			||||||
        {props.label}
 | 
					        {props.label}
 | 
				
			||||||
      </a>
 | 
					      </Link>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -9,12 +9,12 @@ import { tagStartedAction, tagStoppedAction } from "../../presenter/tagSlice";
 | 
				
			|||||||
export default function SelfTags() {
 | 
					export default function SelfTags() {
 | 
				
			||||||
  return (
 | 
					  return (
 | 
				
			||||||
    <Provider store={tagStore}>
 | 
					    <Provider store={tagStore}>
 | 
				
			||||||
      <_SelfTags />
 | 
					      <SelfTagsProvided />
 | 
				
			||||||
    </Provider>
 | 
					    </Provider>
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function _SelfTags() {
 | 
					function SelfTagsProvided() {
 | 
				
			||||||
  const tags = useTagSelector((state) => state.tag.tags);
 | 
					  const tags = useTagSelector((state) => state.tag.tags);
 | 
				
			||||||
  const dispatch = useTagDispatch();
 | 
					  const dispatch = useTagDispatch();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -26,7 +26,7 @@ function _SelfTags() {
 | 
				
			|||||||
      dispatch(tagStoppedAction());
 | 
					      dispatch(tagStoppedAction());
 | 
				
			||||||
      setIsTagsVisible(false);
 | 
					      setIsTagsVisible(false);
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  }, []);
 | 
					  }, [dispatch]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  useEffect(() => {
 | 
					  useEffect(() => {
 | 
				
			||||||
    if (tags.length === 0) return;
 | 
					    if (tags.length === 0) return;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user