Add namespace paths.

This commit is contained in:
Dave Smith-Hayes 2024-03-19 22:37:26 -04:00
parent 5162948e74
commit 2b19e3440d
11 changed files with 21 additions and 18 deletions

View File

@ -1,5 +1,5 @@
import { FC } from "hono/jsx" import { FC } from "hono/jsx"
import ErrorMessage from "./error-message"; import ErrorMessage from "@slovo/frontend/components/form/error-message";
export const LoginForm: FC = (props) => { export const LoginForm: FC = (props) => {
return ( return (

View File

@ -1,5 +1,5 @@
import { FC } from 'hono/jsx'; import { FC } from 'hono/jsx';
import ErrorMessage from './error-message'; import ErrorMessage from '@slovo/frontend/components/form/error-message';
export const RegisterForm: FC = (props) => { export const RegisterForm: FC = (props) => {

View File

@ -1,6 +1,6 @@
import { FC } from 'hono/jsx'; import { FC } from 'hono/jsx';
const currentYear = new Date().getFullYear(); // const currentYear = new Date().getFullYear();
const Footer: FC = (props) => { const Footer: FC = (props) => {
return ( return (

View File

@ -1,6 +1,6 @@
import { Layout } from "../layout"; import { Layout } from "@slovo/frontend/layout";
export const HomePage = (props) => { export const HomePage = () => {
return ( return (
<Layout title="Home"> <Layout title="Home">
<div>Welcome to Slovocast</div> <div>Welcome to Slovocast</div>

View File

@ -1,5 +1,5 @@
import { Layout } from '../layout'; import { Layout } from '@slovo/frontend/layout';
import { LoginForm } from '../components/login-form'; import { LoginForm } from '@slovo/frontend/components/form/login-form';
export const LoginPage = (props: { error?: any }) => { export const LoginPage = (props: { error?: any }) => {
return ( return (

View File

@ -1,5 +1,5 @@
import { RegisterForm } from '../components/register-form'; import { RegisterForm } from '@slovo/frontend/components/form/register-form';
import { Layout } from '../layout'; import { Layout } from '@slovo/frontend/layout';
export const RegisterPage = (props: { error?: any }) => { export const RegisterPage = (props: { error?: any }) => {
return ( return (

View File

@ -1,7 +1,7 @@
import { Hono } from 'hono'; import { Hono } from 'hono';
import { Context } from 'hono'; import { Context } from 'hono';
import { LoginPage } from '../frontend/pages/login'; import { LoginPage } from '@slovo/frontend/pages/login';
import { RegisterPage } from '../frontend/pages/register'; import { RegisterPage } from '@slovo/frontend/pages/register';
const UserHandler = new Hono(); const UserHandler = new Hono();

View File

@ -1,5 +1,5 @@
import { Context } from 'hono'; import { Context } from 'hono';
import SiteData from '../model/SiteData'; import SiteData from '@slovo/model/SiteData';
const currentYear = new Date().getFullYear(); const currentYear = new Date().getFullYear();

View File

@ -1,6 +1,6 @@
import Category from './Category'; import Category from '@slovo/model/Category';
import Image from './Image'; import Image from '@slovo/model/Image';
import Episode from './Episode'; import Episode from '@slovo/model/Episode';
type Channel = { type Channel = {
name: string, name: string,

View File

@ -1,4 +1,4 @@
import Image from './Image'; import Image from '@slovo/model/Image';
type Episode = { type Episode = {
title: string, title: string,

View File

@ -2,6 +2,9 @@
"compilerOptions": { "compilerOptions": {
"strict": true, "strict": true,
"jsx": "react-jsx", "jsx": "react-jsx",
"jsxImportSource": "hono/jsx" "jsxImportSource": "hono/jsx",
"paths": {
"@slovo/*": [ "src/*" ]
}
} }
} }