Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove short descriptions
  • Loading branch information
jameskoster authored and ntsekouras committed Jun 23, 2023
commit 36f3a3bfe83212daae1cc12d4fd37e468aff8c61
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
} from '@wordpress/components';
import { decodeEntities } from '@wordpress/html-entities';
import { useState } from '@wordpress/element';
import { useSelect, useDispatch } from '@wordpress/data';
import { useDispatch } from '@wordpress/data';
import { store as coreStore } from '@wordpress/core-data';
import {
archive,
Expand Down Expand Up @@ -162,25 +162,6 @@ export default function NewTemplate( {
useDispatch( noticesStore );
const { setTemplate } = unlock( useDispatch( editSiteStore ) );

const { homeUrl } = useSelect( ( select ) => {
const {
getUnstableBase, // Site index.
} = select( coreStore );

return {
homeUrl: getUnstableBase()?.home,
};
}, [] );

const TEMPLATE_SHORT_DESCRIPTIONS = {
'front-page': homeUrl,
date: sprintf(
// translators: %s: The homepage url.
__( 'E.g. %s' ),
homeUrl + '/' + new Date().getFullYear()
),
};

async function createTemplate( template, isWPSuggestion = true ) {
if ( isCreatingTemplate ) {
return;
Expand Down Expand Up @@ -310,9 +291,6 @@ export default function NewTemplate( {
title={ title }
direction="column"
className="edit-site-add-new-template__template-button"
description={
TEMPLATE_SHORT_DESCRIPTIONS[ slug ]
}
icon={
TEMPLATE_ICONS[ slug ] || layout
}
Expand Down