new design
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import './Sidebar.css';
|
||||
import { route } from 'preact-router';
|
||||
import type { RecommendationSummary } from '../types/index.js';
|
||||
|
||||
interface SidebarProps {
|
||||
@@ -30,10 +31,27 @@ export function Sidebar({ list, selectedId, onSelect, onNewClick }: SidebarProps
|
||||
return (
|
||||
<aside class="sidebar">
|
||||
<div class="sidebar-header">
|
||||
<a href="/" class="sidebar-title">Recommender</a>
|
||||
<a
|
||||
href="/"
|
||||
class="sidebar-title"
|
||||
onClick={(event) => {
|
||||
event.preventDefault();
|
||||
route('/');
|
||||
}}
|
||||
>
|
||||
Recommender
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<button class="btn-new" onClick={onNewClick}>
|
||||
<button
|
||||
type="button"
|
||||
class="btn-new"
|
||||
onClick={(event) => {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
onNewClick();
|
||||
}}
|
||||
>
|
||||
+ New Recommendation
|
||||
</button>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user