mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 07:15:47 +00:00
refactor(whatsNew): co-locate release-notes page into features/whatsNew
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { version as appVersion } from '../../package.json';
|
||||
import { version as appVersion } from '@/../package.json';
|
||||
import {
|
||||
resolveChangelogEntry,
|
||||
resolveReleaseNotes,
|
||||
type ReleaseNotesSource,
|
||||
} from '../utils/releaseNotes/releaseNotesResolve';
|
||||
import type { ReleaseNotesEntry } from '../utils/releaseNotes/releaseNotesMatch';
|
||||
} from '@/utils/releaseNotes/releaseNotesResolve';
|
||||
import type { ReleaseNotesEntry } from '@/utils/releaseNotes/releaseNotesMatch';
|
||||
|
||||
export interface UseReleaseNotesResult {
|
||||
loading: boolean;
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* What's New feature — the release-notes / changelog page, its release-notes
|
||||
* fetch hook, and the changelog Markdown renderer. The page is lazy-loaded by
|
||||
* the router via its deep path, so it is not re-exported here; nothing else
|
||||
* outside the feature consumes its modules.
|
||||
*/
|
||||
export {};
|
||||
@@ -2,9 +2,9 @@ import React, { useState } from 'react';
|
||||
import { Sparkles, X } from 'lucide-react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { version } from '../../package.json';
|
||||
import { useReleaseNotes } from '../hooks/useReleaseNotes';
|
||||
import { renderChangelogBody } from '../utils/changelog/changelogMarkdown';
|
||||
import { version } from '@/../package.json';
|
||||
import { useReleaseNotes } from '@/features/whatsNew/hooks/useReleaseNotes';
|
||||
import { renderChangelogBody } from '@/features/whatsNew/utils/changelogMarkdown';
|
||||
|
||||
type WhatsNewView = 'highlights' | 'changelog';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { renderChangelogBody } from './changelogMarkdown';
|
||||
import { renderChangelogBody } from '@/features/whatsNew/utils/changelogMarkdown';
|
||||
|
||||
describe('renderChangelogBody', () => {
|
||||
it('renders ## section headings', () => {
|
||||
|
||||
Reference in New Issue
Block a user