Commit 62f9bcfd authored by Yoon, Daeki's avatar Yoon, Daeki 😅
Browse files

preview 추가

parent 53f4f31e
import React from "react"; import React from "react";
import { NavLink } from "react-router-dom";
import { Outlet, useNavigate, useParams } from "react-router-dom";
export const Preview = () => { export const Preview = () => {
return <div>Preview</div>; let { surveyId } = useParams<{ surveyId: string }>();
const navigate = useNavigate();
return (
<div>
<div className="flex place-content-center mt-6">
<NavLink
to={`/surveys/${surveyId}/edit`}
style={({ isActive }) =>
isActive
? {
width: "140px",
color: "white",
backgroundColor: "#008080",
borderTopLeftRadius: "25px",
borderBottomLeftRadius: "25px",
textAlign: "center",
fontWeight: "bold",
fontSize: "20px",
}
: {
width: "140px",
borderWidth: "1px",
borderColor: "#008080",
borderTopLeftRadius: "25px",
borderBottomLeftRadius: "25px",
textAlign: "center",
fontSize: "18px",
}
}
>
<div className="m-3 ">설문지 수정</div>
</NavLink>
<NavLink
to={`/surveys/${surveyId}/result`}
style={({ isActive }) =>
isActive
? {
width: "140px",
color: "white",
backgroundColor: "#008080",
borderTopRightRadius: "25px",
borderBottomRightRadius: "25px",
textAlign: "center",
fontWeight: "bold",
fontSize: "20px",
}
: {
width: "140px",
borderWidth: "1px",
borderColor: "#008080",
borderTopRightRadius: "25px",
borderBottomRightRadius: "25px",
textAlign: "center",
fontSize: "18px",
}
}
>
<div className="m-3">응답결과</div>
</NavLink>
</div>
<Outlet />
</div>
);
}; };
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment